﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RentAWorker.Desktop.Entities;
using System.ServiceModel;

namespace RentAWorker.Business.Interfaces
{
    /// <summary>
    /// Service for managing all available Resources
    /// </summary>
    /// <remarks>Required Security Roles: ResourceManager, AccountManager (read-only)</remarks>
    [ServiceContract]
    public interface IManageResourceService
    {
        [OperationContract]
        RentResource GetResource(int id);
        [OperationContract]
        RentResource[] GetResourcesByLocation(string location, ResourceType? type);
        [OperationContract]
        RentResource SubmitResource(RentResource resourceToCreate);
        [OperationContract]
        void UpdateResource(RentResource resourceToUpdate);
        [OperationContract]
        void DeleteResource(int id);
    }

    public enum ResourceType
    {
        Machine,
        Worker
    }
}
